package com.server.pinggu.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import com.server.pinggu.mapper.SenFocuslogMapper;
import com.server.pinggu.domain.SenFocuslog;
import com.server.pinggu.service.ISenFocuslogService;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ltao
 * @date 2022-10-23
 */
@Service
public class SenFocuslogServiceImpl extends ServiceImpl<SenFocuslogMapper, SenFocuslog> implements ISenFocuslogService {

    @Override
    public List<SenFocuslog> queryList(SenFocuslog senFocuslog) {
        LambdaQueryWrapper<SenFocuslog> lqw = Wrappers.lambdaQuery();
        if (senFocuslog.getYid() != null){
            lqw.eq(SenFocuslog::getYid ,senFocuslog.getYid());
        }
        if (senFocuslog.getUid() != null){
            lqw.eq(SenFocuslog::getUid ,senFocuslog.getUid());
        }
        if (senFocuslog.getDtime() != null){
            lqw.eq(SenFocuslog::getDtime ,senFocuslog.getDtime());
        }
        if (StringUtils.isNotBlank(senFocuslog.getYopenid())){
            lqw.eq(SenFocuslog::getYopenid ,senFocuslog.getYopenid());
        }
        if (StringUtils.isNotBlank(senFocuslog.getUopenid())){
            lqw.eq(SenFocuslog::getUopenid ,senFocuslog.getUopenid());
        }
        if (senFocuslog.getType() != null){
            lqw.eq(SenFocuslog::getType ,senFocuslog.getType());
        }
        return this.list(lqw);
    }
}